package site.zhouinfo.designpattern.guanchazhemoshi.my;

/**
 * @author zhou
 * @create 2017-04-06 17:47
 * @email zhouinfo@qq.com
 */
public class MyMain {

    public static void main(String[] args) {
        MyNewspaper 今日头条 = new MyNewspaper();

        MyObserver reader1 = new MyReader("小明");
        MyObserver reader2 = new MyReader("小红");
        MyObserver reader3 = new MyReader("小白");

        今日头条.attach(reader1);
        今日头条.attach(reader2);
        今日头条.attach(reader3);

        今日头条.notifyObservers("今天大新闻:发现外星人了!!!");
    }
}
